package com.sharemarking.wa.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sharemarking.wa.common.entity.OrgCar;
import com.sharemarking.wa.platform.dto.orderDriver.OrgCarListDto;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author dxy
 */
@Repository
public interface OrgCarMapper extends BaseMapper<OrgCar> {



    @Select("SELECT * FROM wa_org_car WHERE org_id = #{orgId} limit #{pageIndex},#{pageSize}")
    List<OrgCarListDto> getOrgCarList(Map map);

    @Override
    @Insert("INSERT INTO wa_org_car ( number,  car_weight, type,  org_id,  create_date )  VALUES  ( #{number},  #{carWeight}, #{type},  #{orgId}, #{createDate} )")
    int insert(OrgCar entity);
}
